package com.sgcc.pda.frme.protocol.ws.sendbean;

import android.text.TextUtils;

/**
 * guorongxin
 * 设置电能表误差检测参数
 */
public class SetMeterErrorParams {

    private String meterType;
    private String powerInputType;
    private String meterMaiChongNum;

    public String getMeterType() {
        return meterType;
    }

    public void setMeterType(String meterType) {
        this.meterType = meterType;
    }

    public String getPowerInputType() {
        return powerInputType;
    }

    public void setPowerInputType(String powerInputType) {
        this.powerInputType = powerInputType;
    }

    public String getMeterMaiChongNum() {
        return meterMaiChongNum;
    }

    public void setMeterMaiChongNum(String meterMaiChongNum) {
        this.meterMaiChongNum = meterMaiChongNum;
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();
        if (TextUtils.isEmpty(meterType) || meterType.length() != 2) {
            return null;
        }
        sb.append(meterType);
        if (TextUtils.isEmpty(powerInputType) || meterType.length() != 2) {
            return null;
        }
        sb.append(powerInputType);
        if (TextUtils.isEmpty(meterMaiChongNum) || meterType.length() != 8) {
            return null;
        }
        sb.append(meterMaiChongNum);
        return sb.toString();
    }
}
